<?php

/**
* @current cmsmessagespush.php
* @author   LiuYang <liu_yang@haibao.com>
* @date 2017年2月9日 上午11:13:40
*/

namespace haibao\jiepai\model\data\messages;

class CmsMessagesPush extends \haibao\jiepai\model\data\Base{

    /**
     * 业务类型 1，新闻速递 2，九点 3，业务活动
     */
    const TYPE_NEWS =1;
    const TYPE_NINE =2;
    const TYPE_BUSINESS = 3;
     
    /**
     * 目标界面 1，首页  2，推荐 3，我 4，文章
     */
    const TARGETVIEW_HOME = 1;
    const TARGETVIEW_TUIJIAN = 2;
    const TARGETVIEW_MINE = 3;
    const TARGETVIEW_ARTICLE = 4;
   
    /**
     * 0,全部设备 1，苹果  2，安卓
     */
    const RANGEDEVICE_ALL = 0;
    const RANGEDEVICE_APPLE = 1;
    const RANGEDEVICE_ANDROID = 2;
    
    /**
     * 仅注册用户  0 否  1是
     */
    const ISONLYUSER_NO = 0;
    const ISONLYUSER_YES = 1;
    
    public $Type;
    
    public $Message;
    
    public $TargetView;
    
    public $RangeDevice;
    
    public $IsOnlyUser;
    
    public $PublishTime;
    
    public $CreateTime;
    
    public $AdminID;
    
    public $Flag;
    
    public $ArticleID;
    
    public $ArticleType;
    
    public function __construct(){
        parent::__construct();

        $this->setColumnName('Id', 'PushID');

        $this->intField('Type', 'Type',true);
        
        $this->stringField('Message', 'Message',true);
        
        $this->intField('TargetView', 'TargetView',true);
        $this->intField('RangeDevice', 'RangeDevice',true);
        $this->intField('IsOnlyUser', 'IsOnlyUser',true);
        
        $this->dateField('PublishTime', 'PublishTime',true);
        $this->dateField('CreateTime', 'CreateTime',true);
        
        $this->intField('AdminID', 'AdminID',true);
        $this->intField('Flag', 'Flag',true);
        $this->intField('ArticleID', 'ArticleID');
        $this->intField('ArticleType', 'ArticleType');
        
        $this->setTableName('cms_messages_push');
    }
}
